import {HTTP} from "@/utils/http.ts";
import {useState, useEffect} from "react";

const useAdminInformation = () => {
    const [admin_information, setAdminInformation] = useState([]);

    useEffect(() => {
        async function getAdminInformation() {
            const res = await HTTP.post("/post_authority");
            setAdminInformation(res.data);
        }

        getAdminInformation();

    }, []);

    return {admin_information}
}

export default useAdminInformation